import request from "@/utils/request.ts"

// 获取所有菜单
export const getMenu = () => {
    return request({
        method: "get",
        url: `/admin/acl/permission`
    })
}

// 添加菜单
export const addMenu = (data) => {
    return request({
        method: "post",
        url: `/admin/acl/permission/save`,
        data
    })
}

// 添加菜单
export const updateMenu = (data) => {
    return request({
        method: "put",
        url: `/admin/acl/permission/update`,
        data
    })
}

// 删除菜单
export const deleteMenu = (id) => {
    return request({
        method: "delete",
        url: `/admin/acl/permission/remove/${id}`,
    })
}